package org.zcl.内部类.匿名内部类;

import java.util.Timer;
import java.util.TimerTask;

/**
 * @Package org.zcl.内部类.匿名内部类
 * @PROJECT_NAME: question
 * @DESCRIPTION:
 * @USER: zhuchenglin
 * @DATE: 2022/1/6 15:53
 */
public class Demo02_Time {
    public static void main(String[] args) {
        Timer timer = new Timer();
        timer.schedule(new TimerTask() {
            @Override
            public void run() {
                System.out.println("倒计时5秒");
            }
        },5000);//倒计时5秒
    }
}